package cn.tedu.spring.eg3;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestShopController {
    public static void main(String[] args) {
        ApplicationContext context=new AnnotationConfigApplicationContext("cn.tedu.spring.eg3");
        ShopController shopController=context.getBean(ShopController.class);
        System.out.println("4.使用阶段执行的代码块");
        ((AnnotationConfigApplicationContext)context).close();
    }
}
